<template>
	<view class="content">

		<view class="cont-box">
			<image class="phone-icon" src="@/static/img/phone-icon.png"></image>
			<view class="title1">服务热线</view>
			<view class="title2" @click="bindPhone">{{phone||''}}</view>
		</view>


		<view style="width:100%;height:240rpx"></view>

	</view>
</template>

<script>
	 

	import {
		customerInfo

	} from '@/api/common'

	export default {
		 
		data() {
			return {
				phone:'',
				 
			};
		},

		onLoad() {
			this.getCustomerInfo()
		},
		onShow() {
			
			// await this.reset()
		},
		 
		methods: {
			// 获取信息（信息分类（1：联系电话，2：常见问题，3：用户须知））
			async getCustomerInfo(){
				let res = await customerInfo(1)
				if(res.code==200){
					this.phone = res.data.context
				}
			},
			 bindPhone() {
			 	uni.makePhoneCall({
			 		phoneNumber: this.phone //
			 	});
			 },
		}
	};
</script>

<style scoped lang="scss">
	.content {
		height: 100vh;
		overflow-y: auto;
		box-sizing: border-box;
		background: #F6F1E5;
		padding: 30rpx;
		.cont-box {
			background: #fff;
			border-radius: 20rpx;
			padding: 90rpx 0;
			.phone-icon {
				width: 256rpx;
				height: 256rpx;
				display: block;
				margin: 0 auto;
				
			}
			.title1 {
				text-align: center;
				font-family: SF Pro Display, SF Pro Display;
				font-weight: bold;
				font-size: 28rpx;
				color: #4C604E;
				margin-top: 28rpx;
			}
			.title2 {
				text-align: center;
				font-family: SF Pro Display, SF Pro Display;
				font-weight: bold;
				font-size: 72rpx;
				color: #4C604E;
				margin-top: 34rpx;
			}
		}
	}


	 
</style>